import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('views/Home')
const Index = () => import('views/Index')
const Project = () => import('views/project/Project')
const Music = () => import('views/project/music/Index')

// 1.安装插件
Vue.use(VueRouter)

// 2.创建router
const routes = [
  {
    path: '',
    redirect: '/home'
  },
  {
    path: '/home',
    name: '我的网站',
    component: Home
  },
  {
    path: '/index',
    name: '网站首页',
    component: Index
  },
  {
    path: '/project',
    name: '项目',
    component: Project
  },
  {
    path: '/project/music',
    name: '网易云音乐',
    component: Music
  }
]
const router = new VueRouter({
  routes,
  mode: 'history'
})


export default router
